package com.ttbj.controller.enums;


/**
 * 用户类型enum
 * @author Administrator
 *
 */
public enum UserTypeEnum {
	APPLET_TYPE(1, "openId"), ANDROID_TYPE(2, "token");
	private int flag;
	private String type;

	private UserTypeEnum(int flag, String type) {
		this.flag = flag;
		this.type = type;
	}

	public int getFlag() {
		return flag;
	}

	public void setFlag(int flag) {
		this.flag = flag;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String optionType(int flag) {
		switch (flag) {
		case 1:
			return APPLET_TYPE.getType();
		case 2:
			return ANDROID_TYPE.getType();
		}
		return type;
	}

}
